package cn.myfreecloud.discovery.controller;


import cn.myfreecloud.discovery.entity.Acart;
import cn.myfreecloud.discovery.service.AcartService;
import common.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author rdh
 * @date 2021-09-27 08:58:45
 */
@RestController
@RequestMapping("/acart")
public class AcartController extends BaseController {
    @Autowired
    AcartService acartService;

    /**
     * 测试
     *
     * @Date: 2022-2-17 15:57
     * @Param:
     * @return:
     * @Author: rendh
     **/

    @PostMapping("/get")
    public Acart getSysUnitPage(@RequestBody Acart acart) {
        Acart byId = acartService.getByIds(acart.getId());
        return byId;
    }

    /**
     * 测试上传
     *
     * @Date: 2022-2-18 11:47
     * @Param:
     * @return:
     * @Author: rendh
     **/

    @PostMapping("/save")
    public Boolean insert(@RequestBody Acart acart) {
        boolean save = acartService.save(acart);
        return save;

    }

}
